const timeline = this.pageObj.getApiWidgetByAliasName('timeline-v2');
const timelineDetail = this.pageObj.getApiWidgetByAliasName('timeline-detail');
const eventReturn = this.pageObj.getApiWidgetByAliasName('event-return');

let option = timeline.widgetObj._option;
const com = { nowrap: true, overflow: 'ellipsis', type: "text" };
const row = { ...com, column: 9, container: "content", type: "object" };
// 时间轴模式
option.mode = 'timeline';
// 使用边框气泡
option.bubble = { type: 'bubble-border' };
// 设置气泡三角位置
option.triangle = { direction: 'left', left: -25 };
// 设置内容显示配置
option.config = [
  { ...row, field: "name", label: "任务名称" },
  { ...row, field: "value", label: "任务接受方" },
  { ...row, field: "name", label: "任务时间" },
  { ...row, field: "value", label: "任务类型" },
  { ...row, field: "content", label: "任务点位" },
  {
    ...row,
    field: "value",
    label: "任务状态",
    btns: [
      { name: '进度', offsetX: 5, offsetY: -1 },
      { name: '详情', offsetX: 5, offsetY: -50 },
    ]
  },
];

timelineDetail.hideWidget();
timeline.widgetObj.show({ top: 200 });
eventReturn.hideWidget()
console.log($event, timeline, option)

if ($event === 'incomplete') {
  // 未开始
} else if ($event === 'ongoing') {
  // 进行中
} else if ($event === 'done') {
  // 已完成
}


timeline.widgetObj._option = option
timeline.widgetObj.render()





